Defining new arrow types

??=[arrows.defining] All of the above arrows are really defined using the primitive || that is used like this:
\begin{defs1}
\vert\morphism\vert <line type> <tip> <tip> <path>
\end{defs1}
where As an example, the || command described in section ??[basics.arrows] is really just an abbreviation for || || || || |[ddr]|.

You can also define new `straight arrow types' that are available in all the standard directions shown in the figure in section ??[basics.arrows] as well as the `|x|-form'. The following uses this for a new arrow type |mapsto|:
\begin{code}
\definemorphism{mapsto}\solid\tip\stop
\diagram
A \rmapsto^f & A\times A \dlmapsto_g \\
B \umapsto
\enddiagram
\end{code}
typesets

$\displaystyle \docode$

You should only use || if you need it, though, since it defines many control sequences. The reference manual [#!R94:XY-picRM!#] describes how to define your own groups of bent arrows and how to make double and triple tips. It also describes a much more general way of defining new arrows.
The "v3" arrow and directional commands make this obsolete in that most arrows can be specified directly in a very compact way.